# 发送普通邮件
# smtplib
# email

import smtplib
from email.mime.text import MIMEText
from email.header import Header

# 登录邮箱
smtp_obj = smtplib.SMTP("smtp.163.com")
smtp_obj.login("18735816507@163.com","授权密码")

# 编辑内容
mail_text = 'This is Email~'
msg_body = MIMEText(mail_text, 'plain', 'utf-8')
msg_body['From'] = Header('Python测试发件人', 'utf-8')
msg_body['Subject'] = Header('Python测试发邮件主题', 'utf-8')

# 发送邮件
smtp_obj.sendmail("18735816507@163.com", ["xxacker@163.com"], msg_body.as_string())
